<?php


namespace dsp\decorator;


class Main extends \kernel\BaseMain
{

    public function execute($choice = 'all')
    {
        $simple = new ConcreteComponent();
        echo "Client: I've got a simple component:\n";
        echo "Result: " . $simple->operation() . PHP_EOL;

        $decorator1 = new ConcreteDecoratorA($simple);
        $decorator2 = new ConcreteDecoratorB($decorator1);
        echo "Client: Now I've got a decorated component:\n";
        echo "Result: " . $decorator2->operation() . PHP_EOL;
    }
}